import { Button } from "antd";
import { useNavigate } from "react-router-dom";

const AddRouteTest = () => {
  const navigate = useNavigate();
  const loginOut = () => {
    navigate("/login");
    localStorage.clear();
  };
  return (
    <>
      <div>我是后端返回的路由页面</div>
      <Button onClick={loginOut}>登出</Button>
    </>
  );
};
export default AddRouteTest;
